package com.dyw.blog.service;

import com.dyw.blog.dao.entity.SysUser;
import com.dyw.blog.vo.Result;
import com.dyw.blog.vo.UserVo;

/**
 * @author Devil
 * @create 2022-02-10 17:32
 */
public interface SysUserService {
    SysUser findUserById(Long id);

    SysUser findUser(String account, String password);

    /**
     * 根据token 查询用户信息
     * @param token
     * @return
     */
    Result findUserByToken(String token);

    /**
     * 根据账户查找用户
     * @param account
     * @return
     */
    SysUser findUserByAccount(String account);


    /**
     * 将注册信息存入表中
     * @param sysUser
     */
    void save(SysUser sysUser);

    /**
     * 验证token
     * @param token
     * @return
     */
    SysUser checkToken(String token);

    UserVo findUserVoById(Long authorId);
}
